<template>
	<view class="jjhxzczdff display-flex czbj">
			<view class="xzczxereswt   flex-1">
				<view class="">
					<image src="https://duxinggj-1251133427.cos.ap-guangzhou.myqcloud.com/yx/yuyue/xqw/chongzhiicon.png" class="cxzcdsfdfdf"
						mode="widthFix"></image>
				</view>

			</view>
			<view class="xzczxertet">
				<view class="pr pd vertical-center">
					<view class="">
						<view type="primary" class="cxcfdfdf vertical-center" @tap="cdkdfdsft">
							<view class="cf">
								<text class="cz">立即充值</text>
								<image src="../../static/cxcxdfa.png" class="cz xcxerxdrtret ml20"></image>
							</view>
						</view>
						
						<view type="primary" class="cxcfdfdf ab vertical-center mt30" @tap="callBack">
							<view class="">
								<text class="cz">返回上一页</text>
								<image src="../../static/cxcxdfb.png" class="cz xcxerxdrtret ml20"></image>
							</view>
						</view>
					</view>

				</view>
			</view>
		</view>
</template>
<script lang="ts" setup>
	import { onLoad } from "@dcloudio/uni-app"
	import { ref } from "vue"
	import { hf, dxrequest, callBack } from "@/util/index.js"
	const miniapp_charge_path = ref()
	const fromAgentId = ref()
	onLoad((data)=>{
		miniapp_charge_path.value = decodeURIComponent(data.miniapp_charge_path)
		fromAgentId.value = data.fromAgentId
	})
	const cdkdfdsft = () => {
		console.log(miniapp_charge_path.value)
		console.log(fromAgentId.value)
		uni.openEmbeddedMiniProgram({
			appId: 'wx59e8d96758d4b05d',
			path: miniapp_charge_path.value,
			extraData: {
				fromAgentId:fromAgentId.value
			},
			success(res) {
				callBack()
			}
		})
	} 
	
</script>

<style scoped>
	.cxzcdsfdfdf{
		width: 583rpx;
		height: 378rpx;
	}
	.cxcfdfdf{
		width: 529rpx;
		height: 90rpx;
		border-radius: 80rpx;
		line-height: 90rpx !important;
		padding: 0 !important;
		font-size: 30rpx;
		background: linear-gradient( 90deg, #4442DC 0%, #A450F0 100%) !important;
	}
	.xcxerxdrtret{
		width: 31rpx;
		height: 31rpx;
	}
	.cxcfdfdf.ab{
		background: #fff !important;
		color: #502FCA !important;
		border:2rpx solid rgba(164, 80, 240, 1)
	}
</style>